Selenium 3: Banker.am


In [1]:
from selenium import webdriver
browser = webdriver.Chrome()
url = "http://www.banker.am/%D5%BE%D5%A1%D6%80%D5%AF%D5%A5%D6%80/"
browser.get(url)

In [2]:
element_1 = browser.find_element_by_xpath('/html/body/div/div[2]/div[4]/div[2]/div/div/div[3]/select[1]/option[4]')
print(element_1.text)
element_1.click()


Հիփոթեք

In [3]:
element_2 = browser.find_element_by_xpath('/html/body/div/div[2]/div[4]/div[2]/div/div/div[3]/select[2]/option[2]')
print(element_2.text)
element_2.click()


Բոլորը

In [4]:
html = browser.page_source

In [5]:
result = browser.find_element_by_css_selector('div.banks-list > div:nth-child(2) > div:nth-child(4)')
print(result.text)


2000

In [6]:
result = browser.find_element_by_xpath('//div[4]/div[2]/div[4]')
print(result.text)


2000

In [ ]:
browser.close()